Skip to content

smtp: add --ehlo-domain/--helo-domain to set the client greeting name - #753

Merged
zakird merged 2 commits into
zmap:masterfrom
codyprime:jcody/smtp-ehlo-domain
Aug 31, 2026
Merged

smtp: add --ehlo-domain/--helo-domain to set the client greeting name#753
zakird merged 2 commits into
zmap:masterfrom
codyprime:jcody/smtp-ehlo-domain

Conversation

@codyprime

Copy link
Copy Markdown
Member

The EHLO/HELO argument identifies the connecting client (RFC 5321 4.1.4), but the module sent the target's domain. These flags were removed in 589d4e0. Re-add flags to set it explicitly; when unset, behavior is unchanged (falls back to the target domain).

How to Test

New flag

echo mail.gmx.com \
  | go run ./cmd/zgrab2 smtp --blocklist-file=/dev/null --port=587 --ehlo-domain=example.com \
  | jq -r '.data.smtp.result.ehlo'
250-gmx.net Hello example.com [87.249.134.6]
250-8BITMIME
250-SIZE 141557760
250 STARTTLS

Regression (default behavior)

echo mail.gmx.com \
  | go run ./cmd/zgrab2 smtp --blocklist-file=/dev/null --port=587 --ehlo-domain=example.com \
  | jq -r '.data.smtp.result.ehlo'
250-gmx.net Hello mail.gmx.com [87.249.134.6]
250-8BITMIME
250-SIZE 141557760
250 STARTTLS

The EHLO/HELO argument identifies the connecting client (RFC 5321
4.1.4), but the module sent the target's domain. Re-add flags to set it
explicitly; when unset, behavior is unchanged (falls back to the target
domain).
@zakird
zakird enabled auto-merge (squash) August 31, 2026 03:46
@zakird
zakird disabled auto-merge August 31, 2026 03:53
@zakird
zakird merged commit 1da5de6 into zmap:master Aug 31, 2026
60 of 61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants